<script setup lang="ts">
const formData = ref({});
const positionLst = ref([{ value: 1, labrel: "员工" }]);

const emits = defineEmits(["close", "confirm"]);
const close = () => {
  emits("close");
};

const confirm = () => {
  emits("confirm");
};
</script>

<template>
  <div class="dialog">
    <div class="dialog-box">
      <div class="header">
        <div class="left">
          <img src="~/assets/dialog-icon.png" alt="" />
          <span>注销账号</span>
        </div>
        <img class="close" src="~/assets/modal-close.png" alt="" @click="close" />
      </div>

      <div class="dialog-content">
        <p>用户根据需要，注销后账号所有数据将被销毀并不可找回，请谨慎操作。</p>
      </div>

      <div class="footer">
        <span class="btn" @click="close">取消</span>
        <span class="btn red" @click="confirm">确定注销</span>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.dialog {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(25, 30, 40, 0.4);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-box {
  max-width: 600px;
  background: #ffffff;
  border-radius: 12px 12px 12px 12px;
  padding: 24px;

  .header {
    display: flex;
    align-items: center;
    padding-bottom: 20px;

    .left {
      flex: 1;
      display: flex;
      align-items: center;

      img {
        width: 20px;
        height: 20px;
        margin-right: 4px;
      }

      span {
        font-size: 16px;
        color: #191e28;
        font-weight: bold;
      }
    }

    .close {
      width: 18px;
      height: 18px;
      cursor: pointer;
    }
  }
  .footer {
    display: flex;
    padding: 32px 0 0;
    justify-content: flex-end;
    span {
      width: 92px;
      height: 36px;
      cursor: pointer;
    }
    .btn:nth-child(1) {
      background: #ffffff;
      border-radius: 8px 8px 8px 8px;
      border: 1px solid rgba(25, 30, 40, 0.08);
      display: flex;
      align-items: center;
      justify-content: center;
      color: rgba(25, 30, 40, 0.6);
      margin-right: 12px;
    }
    .btn:nth-child(2) {
      background: #1dbf73;
      border-radius: 8px 8px 8px 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
    }
    .btn.red {
      background: none;
      color: #ff4f4f;
      border: 1px solid #ff4f4f;
      cursor: pointer;
      transition: all 0.3s;
      &:hover {
        background: #ff4f4f;
        color: #fff;
      }
    }
  }

  .dialog-content p {
    display: flex;
  }
  .video {
    width: 100%;
    max-height: 500px;
    background: #333;
  }
  .textarea {
    margin-top: 10px;
    textarea {
      width: 100%;
      height: 96px;
      background: rgba(25, 30, 40, 0.02);
      border-radius: 12px 12px 12px 12px;
      border: 1px solid rgba(25, 30, 40, 0.08);
      padding: 16px;
      box-sizing: border-box;
      resize: none;
    }
  }
}
</style>

<style>
.dialog .el-select__wrapper {
  height: 40px;
}
.dialog .el-form--default.el-form--label-top .el-form-item .el-form-item__label {
  color: #191e28;
  font-weight: bold;
}
</style>
